home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group94b.txt
/
000118_icon-group-sender _Mon Nov 21 11:31:37 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1995-02-09
|
2KB
Received: by cheltenham.cs.arizona.edu; Mon, 21 Nov 1994 13:15:18 MST
To: icon-group-l@cs.arizona.edu
Date: 21 Nov 1994 11:31:37 -0700
From: kline@cs.arizona.edu (Nick Kline)
Message-Id: <3aqp29$do0@cheltenham.cs.arizona.edu>
Organization: University of Arizona CS Department, Tucson AZ
Sender: icon-group-request@cs.arizona.edu
References: <3aofof$f5m@highway.leidenuniv.nl>, <3aonpq$4kp@caslon.cs.arizona.edu>
Subject: Re: optional typing in Icon (longish)
Errors-To: icon-group-errors@cs.arizona.edu
In article <3aonpq$4kp@caslon.cs.arizona.edu>,
Dave Schaumann <dave@CS.Arizona.EDU> wrote:
>In article <3aofof$f5m@highway.leidenuniv.nl>,
>Jan-Peter de Ruiter <ruiter@ruls41.LeidenUniv.nl> wrote:
>[much deletia]
>>o How much optimisation opportunities will arise from having
>> variables with a fixed type.
>
>For types that have primitive operations that can be implemented
>in a few machine operations (few enough to be in-lined reasonably),
>this can be a significant savings. Not only do you get the benefit
>of not having to go through the general case (which probably involves
>a function call), but you also get the benefit of less stuff dynamically
>allocated, so the garbage collecter has less work to do.
and also think how much this would complicate the runtime. The run
time is complex, but basically it has encapsulated types, and all the
run time function take these as parameters. It can take a pointer and
see what type it is and decide whether to convert it to a string, or
convert a string to an int and add another number to it or whatever.
If we could somehow figure out that certain things were only going to
be used as ints (and it is sure possible), then we would need to have a much
more complex runtime, which instead of simply passing ptrs to "objects" as
parameters to icon internal routines, we'd need to special case all
that code in the case where we already knew things were ints.
I think a better soln is to improve the icon compiler (which I know clint
has one of his students working on).
-nick